package xyz.xtt.asset.service;

import java.math.BigDecimal;
import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;

import xyz.xtt.asset.api.enums.ReferProtocolEnum;
import xyz.xtt.asset.client.request.ReMintRequest;
import xyz.xtt.asset.client.response.MintResponse;
import xyz.xtt.asset.entity.TblRemintAccount;
import xyz.xtt.asset.enums.OrderTypeEnum;
import xyz.xtt.asset.vo.RemintAccountVo;
import xyz.xtt.pay.client.response.TblPayOrderDto;

/**
 * <p>
 * 铸作权帐户表 服务类
 * </p>
 *
 */
public interface ITblRemintAccountService extends IService<TblRemintAccount> {

	/**
	 * 初始化铸作权
	 * 
	 * @param assetId
	 * @param userId
	 * @param referProtocol
	 * @param amount
	 * @return
	 */
	TblRemintAccount initRemintAccountAmount(Long assetId, Long userId, ReferProtocolEnum referProtocol, BigDecimal amount);

	/**
	 * 铸作权调整
	 * 
	 * @param assetId
	 * @param ownerId
	 * @param referProtocol
	 * @param amount
	 * @return
	 */
	Boolean accountAdjust(Long assetId, Long ownerId, ReferProtocolEnum referProtocol, BigDecimal amount);

	/**
	 * 铸作权
	 * 
	 * @param payOrderDto
	 */
	void reMintPayAfter(TblPayOrderDto payOrderDto);

	/**
	 * 铸作权重铸
	 * 
	 * @param mintRequest
	 * @param mint
	 * @return
	 */
	MintResponse reMint(String uid, ReMintRequest mintRequest, OrderTypeEnum mint);

	/**
	 * 获取铸造权详情
	 * 
	 * @param id
	 * @return
	 */
	RemintAccountVo info(Long id);

	List<RemintAccountVo> getListByUserId(Long userId, Integer currPage, Integer pageSize);
}
